import java.util.HashMap;
import java.util.Scanner;

public class Main {

    public int MoreThanHalfNum_Solution(int [] array) {
        HashMap<Integer,Integer> map = new HashMap<>();

        if(array.length == 1) {
            return array[0];
        }
        int count = -1;
        int redex = 0;

        for(int i=0; i < array.length;i++) {
            if(map.get(array[i]) == null) {
                map.put(array[i],1);
            }else{
                map.put(array[i],map.get(array[i])+1);
                int val = map.get(array[i]);
                if(val >= count) {
                    count = val;
                    redex = array[i];
                }
            }
        }

        return redex;
    }

    public static void main(String[] args) {

    }


    public static boolean set(char ch) {
        if(ch >= '0' && ch <= '9') {
            return true;
        }

        return false;
    }

    public static void main1(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String str = scanner.nextLine();
        String str1 = "";
        int i = 0;
        while(i < str.length()) {
            String str2 = "";

            while(i < str.length() && !set(str.charAt(i))) {
                i++;
            }

            while(i < str.length() && set(str.charAt(i))) {
                str2 +=str.charAt(i);

                i++;
            }

            if (str2.length() > str1.length()) {
                str1 = str2;
            }
        }
        System.out.println(str1);
    }
}
